//导包
importClass(android.graphics.PorterDuffXfermode) //导入安卓PorterDuff画笔设置类

//变量创建
//定义悬浮窗、画布
var win = floaty.rawWindow(
    <frame gravity="center">
        <canvas id="board" w="auto" h="auto" />
    </frame>
);
//定义画笔
var paint = new Paint();
//定义路径
var path = new android.graphics.Path()
//设置画笔和悬浮窗
win.setTouchable(false); //悬浮窗不可触摸
win.setSize(-1, -1); //-1为铺满屏幕
var img = images.read("五条悟.png")
var b = images.toBytes(img);
//bm = android.graphics.BitmapFactory.decodeFile("icon.png");
win.board.on("draw", (canvas) => {
    bm = android.graphics.BitmapFactory.decodeByteArray(b, 0, b.length);
    canvas.drawBitmap(bm, 50, 50, paint);
})
setInterval(() => {
}, 8000);